1. Field of the Invention
The present invention relates to an encoding rate controlling apparatus which controls an encoding rate when using a predetermined quantization scale code and then quantizing information and further encoding it, and an information encoding apparatus including the encoding rate controlling apparatus, and more particularly relates to an encoding rate controlling apparatus for controlling the encoding rate when carrying out the encoding while making the encoding rate variable, and an information encoding apparatus including the encoding rate controlling apparatus.
2. Description of the Related Art
There are various encoding methods for encoding information, especially, digital information and then recording it onto a record medium or transmitting it through a broadcast wave, for example. An MPEG method is one of them, which is used to record a dynamic image onto a DVD (i.e., an optical disk that increases a record capacity to about seven times that of a conventional CD (Compact Disk)) that has been recently put into a practical use.
Here, the MPEG method is an encoding technique which can compress image information originally having a large amount of information at a high efficiency by variable-length-encoding the information, which is obtained by performing a DCT (Discrete Cosine Transform) with respect to a difference between an image to be encoded and a reference image located on a time axis before or behind the image to be encoded and quantizing it, and a difference of moving vectors (each implying a vector indicative of a direction and an amount in a movement if there is any movement between the reference image and the image to be encoded) by a unit of a macro block (implying a square pixel block including pixels of 16 pixels×16 pixels in the image), and then transmitting or recording it.
By the way, when a simple image and a complex image are all compressed under the same compression rate at a time of compressing the images, for example, if it is the complex image, the excessive compression causes the image after the compression to be deteriorated.
Therefore, the MPEG method is constructed so as to use a so-called variable rate encoding manner and then make a compression rate variable for each image (namely, make an encoding rate variable) and accordingly carry out the encoding operation.
On the other hand, as a compression method using the variable rate encoding manner in the MPEG method, there are a manner referred to as a so-called two-times variable rate encoding manner and a manner referred to as a one-time variable rate encoding manner.
Here, the two-times variable rate encoding manner is the method of estimating a data generation amount (in other words, its quantization scale code) after respective encoding operations over all images to be encoded one time, and accurately controlling the encoding rate and the quantization scale code of each frame image at a second process, in accordance with the estimated data generation amount, and then carrying out the compression encoding optimal for the complexity of each image.
This two-times variable rate encoding manner can obtain the data generation amount in advance. Thus, if an image is compressed and encoded to a predetermined data amount, the optimal encoding rate and quantization scale code can be always calculated to thereby compress and encode to an image having a high image quality.
On the other hand, at first, the one-time variable rate encoding manner tentatively establishes an original quantization scale code of an image by using a predetermined method, and then starts the operations of quantizing and encoding the image by using the tentatively-established quantization scale code. Then, this manner sequentially calculates the average value of the encoding rate changed on the basis of the data generation amounts after the encoding of the respective images generated after the start of the operations (at this stage, even if the data generation amount of the image is changed, since the corresponding quantization scale code is constant, the corresponding encoding rate is also changed), and then compares this average value with a predetermined threshold. If the average value is greater, this manner determines that the data generation amount is excessive, and thereby increases the quantization scale code, and accordingly controls so as to reduce the average value. On the other hand, if the average value is smaller, it determines that the data generation amount is too small, and thereby decreases the quantization scale code, and accordingly carries out a process of increasing the average value.
This one-time variable rate encoding manner can compress and encode an input image to be encoded in a real time (namely, the input image can be compressed and encoded in an input order in the real time without analyzing the input image a plurality of times).
However, the above mentioned two-times variable rate encoding manner needs to analyze in advance the respective images to be encoded one time. This results in a problem that it is not suitable for the compression and the encoding in the real time.
On the other hand, the one-time variable rate encoding manner has the following problem. That is, the image quality is extremely dropped if a value of a quantization scale code tentatively established at an initial time of starting the compression and the encoding does not agree with a performance of an actual image although the compression and the encoding are possible in the real time (for example, in a series of images to be encoded, although there is not a substantial movement within the image in the vicinity of the lead thereof, if the movement within the image is suddenly increased by a scene change and the like).